<?php
/**
* activity.php
*
* Create on 2015-8-5
* Create by TT
*/
namespace haibao\app\business;

use \haibao\app\data\Activity as ActivityData;

class Activity extends \haibao\cms\business\Base {
	/**
	 * 添加活动
	 * @param \haibao\app\model\data\Article $model
	 */
	public static function addActivity($model){
		self::checkOperation(self::FUNC_CODE_APP_ACTIVITY_ADD);
		$data = new ActivityData();
		$data->add($model);
	}
	
	/**
	 * 修改活动
	 * @param \haibao\app\model\data\Article $model
	 */
	public static function updateActivity($model){
		self::checkOperation(self::FUNC_CODE_APP_ACTIVITY_UPDATE);
		$data = new ActivityData();
		$data->updateActivity($model);
	}
	
	public static function getActivityList($activityFilter){
		$data = new ActivityData();
		return $data->getAll($activityFilter);
	}
	
	/**
	 * 修改活动状态
	 * @param int $id
	 * @param int $status
	 */
	public static function updateStatus($id){
	}
	
	/**
	 * 修改活动评论数
	 * @param unknown_type $id
	 * @param unknown_type $flag
	 */
	public static function updateCommentClick($id){
	}
	
	public static function getOneActivity($activityFilter){
		$data = new ActivityData();
		return $data->getOne($activityFilter);
	}
	
	public static function getClickByArticleIds($ids){
		$data = new ActivityData();
		return $data->getClickByArticleIds($ids);
	}
}